﻿using System;
using Kiva7.Utilities;
using Kiva7.DataResponse;
using Kiva7.DataClasses;

namespace Kiva7.DataRequests
{
    public class CommentsRequest : DataRequest<CommentsResponse, Comment>
    {
        public CommentsRequest()
            : base(true, true)
        {
        }
        public Uri BuildUri(int journalentryId)
        {
            UrlCreator url = new UrlCreator(string.Format(BaseUrl + "journal_entries/{0}/comments.xml", journalentryId));

            url.Add("app_id", KivaAppId);

            return url.ToUri();
        }


        internal void GetComment(int journalentryId)
        {
            LoadResponse(BuildUri(journalentryId));
        }
    }


}
